package com.gxa.xiaoucomeshome.service;

import com.gxa.xiaoucomeshome.pojo.Agree;
import com.gxa.xiaoucomeshome.pojo.Order;
import com.gxa.xiaoucomeshome.pojo.User;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface UserService {


    User selectByPhone(String phone);
    void insert(String name,String phone,String pwd);
    Integer selectStateByWait(Integer uid);
    Integer selectStateByRunning(Integer uid);
    Integer selectStateByFalse(Integer uid);
    Integer selectStateBySuccess(Integer uid);
    List<Map<String,Object>> selectOrderListByWait(Integer uid);
    List<Map<String,Object>> selectOrderListByRunning(Integer uid);
    List<Map<String,Object>> selectOrderListBySuccess(Integer uid);
    List<Map<String,Object>> selectOrderListByFalse(Integer uid);
    Map<String,Object> selectByOrder_id(String id);
    List<Map<String, Object>> selectAllOrder(Integer uid, String startTime, String endTime,Integer code);
    /**
     * 用户下单
     * @param order_id
     * @param site_id
     * @param address_id
     * @param uid
     * @param commitDate
     */
    void insertOrder(String order_id, Integer site_id, Integer address_id, Integer uid,
                      Date commitDate,String img1,String img2);

    /**
     * 通过订单号查询单条订单记录
     * @param order_id
     * @return
     */
    List<Map<String, Object>> selectOrderById(String order_id);

    List<Agree> selectAgree();
    Order selectByOrder_state(Integer uid);

}
